php remove parentheses and contents from string

110

php remove parentheses and contents from string -

$string = "ABC (Test1)";
echo preg_replace("/\([^)]+\)/","",$string); // 'ABC '

Comments

Submit
0 Comments